package com.atguigu.spzx.product.controller;

import com.atguigu.spzx.common.result.Result;
import com.atguigu.spzx.product.service.impl.BrandServiceImpl;
import com.atguigu.spzx.product.vo.BrandQueryRespVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * BrandController
 * </p>
 *
 * @author flyduck
 * @since 2023/11/3
 */
@Api(tags = "品牌管理接口")
@RestController
@RequestMapping("/api/product/brand")
public class BrandController {

    @Autowired
    private BrandServiceImpl brandService;

    @ApiOperation("获取全部品牌")
    @GetMapping("/findAll")
    public Result findBrandList(){
        List<BrandQueryRespVo> list = brandService.findBrandList();
        return Result.ok(list);
    }
}
